package bit.springprinciple.demos;

import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

@Component
public class DogConfig {

    @Bean//方法注解必须搭配类注解使用
    public Dog dog0(){
        Dog dog=new Dog();
        dog.setName("汪汪");
        return dog;
    }
}
